import Taro, { Component } from "@tarojs/taro";
import { View } from "@tarojs/components";
import WxParse from "./wxParse/wxParse.js";
// import "./wxParse/wxParse.wxss";
import './wxParse.scss'

export default class ParseComponent extends Component {
  componentDidMount() {}
  render() {
    if (this.props.mark) {
      let domText = this.props.mark;
      WxParse.wxParse("article", "markdown", domText, this.$scope, 5);
    }
    return (
      <View>
        <import src="./wxParse/wxParse.wxml" />
        <template is="wxParse" data="{{wxParseData:article.nodes}}" />
      </View>
    );
  }
}
